package com.qiaoya.model.dto;

import java.io.Serializable;  
  
/** 
 * Response JsonResult for RESTful <br> 
 * 封装 返回Json 格式数据 
 *  
 * @author XiaoQiao
 * @since 20170517
 **/   
public class JsonResult<T> implements Serializable {  
	private static final long serialVersionUID = 9206930582894781548L;
	/** 
     * 数据 
     */  
    private T Data;  
    /** 
     * 返回码
     */  
    private int Code;
    /** 
     * 信息 
     */  
    private String Message;  

  
    public Object getData() {  
        return Data;  
    }  
  
    public void setData(T data) {  
        this.Data = data;  
    }  
  
    public String getMessage() {  
        return Message;  
    }  
  
    public void setMessage(String message) {  
        this.Message = message;  
    }  
  
    public int getCode(){
    	return Code;
    }
    
    public void setCode(int code){
    	this.Code = code;
    }

  
    public JsonResult() {  
        super();  
    }  
  
    public JsonResult(T data, String message, int code) {  
        this.Data = data;  
        this.Message = message;  
        this.Code = code;  
    }  
  
    public JsonResult(T data, String message) {  
        this.Data = data;  
        this.Message = message;  
        this.Code = 200;  
    }  
  
    public JsonResult(T data) {  
        this.Data = data;  
        this.Code = 200;  
        this.Message="sucess";
    }  
}  